-->[f,xopt,gradopt,work]=optim(list(purequad,Qmat),x0vec,imp=9) !--error 4 undefined variable : Qmat -->Qmat=[1 0;0 3]; -->[f,xopt,gradopt,work]=optim(list(purequad,Qmat),x0vec,imp=9) !--error 4 undefined variable : x0vec -->x0vec=[1 1] x0vec = 1. 1. -->[f,xopt,gradopt,work]=optim(list(purequad,Qmat),x0vec,imp=9) 1. 1. 0.9666667 0.9 0.6666667 1.110D-16 - 1.6530612 0.1836735 0.0123071 0.0518115 - 0.0000916 - 0.0003857 1.0D-19 * - 0.1355253 - 0.5421011 1.0D-34 * 0.0601853 0.1203706 norm of projected gradient lower than 7.3218591D-35 work = column 1 to 8 2. - 5.551D-17 6. 1.355D-20 5.421D-20 2.711D-20 3.253D-19 - 1.355D-20 column 9 to 15 - 5.421D-20 - 2.711D-20 - 3.253D-19 6.019D-36 1.204D-35 1.204D-35 7.222D-35 gradopt = 1.0D-34 * 0.1203706 0.7222237 xopt = 1.0D-34 * 0.0601853 0.1203706 f = 4.709D-70 -->diary(0)